import { createApp } from 'vue'
import router from './router';
import store from './stores';
import './assets/css/global.css'; // 引入全局 CSS
import App from './App.vue'
import { createPinia } from 'pinia' // 导入 Pinia,状态管理

// 导入组件
import HeaderComponent from '@/components/Header.vue';
import FooterComponent from '@/components/Footer.vue';
import FoodFavorites from '@/components/FoodFavorites.vue';
import Languages from '@/components/Languages.vue';

// 创建 app 实例
const app = createApp(App)
const pinia = createPinia()

// 全局注册组件
app.component('header-component', HeaderComponent);
app.component('footer-component', FooterComponent);
app.component('food-favorites', FoodFavorites);
app.component('languages', Languages);

// 使用插件
app.use(store)
app.use(pinia)
app.use(router).mount('#app');
